home *** CD-ROM | disk | FTP | other *** search
/ Giga Games 1 / Giga Games.iso / net / usenet / volume7 / nethack3 / patch7b < prev    next >
Encoding:
Internet Message Format  |  1990-02-26  |  60.0 KB

  1. Path: uunet!zephyr.ens.tek.com!tekred!saab!billr
  2. From: billr@saab.CNA.TEK.COM (Bill Randle)
  3. Newsgroups: comp.sources.games
  4. Subject: v09i002:  NetHack3 -  display oriented dungeons & dragons (Ver. 3.0), Patch7b
  5. Message-ID: <5216@tekred.CNA.TEK.COM>
  6. Date: 24 Feb 90 00:28:07 GMT
  7. Sender: news@tekred.CNA.TEK.COM
  8. Lines: 2259
  9. Approved: billr@saab.CNA.TEK.COM
  10.  
  11. Submitted-by: Izchak Miller <izchak@linc.cis.upenn.edu>
  12. Posting-number: Volume 9, Issue 2
  13. Archive-name: NetHack3/Patch7b
  14. Patch-To: NetHack3: Volume 7, Issue 56-93
  15.  
  16.  
  17.  
  18. #! /bin/sh
  19. # This is a shell archive.  Remove anything before this line, then unpack
  20. # it by saving it into a file and typing "sh file".  To overwrite existing
  21. # files, type "sh file -c".  You can also feed this as standard input via
  22. # unshar, or by typing "sh <file", e.g..  If this archive is complete, you
  23. # will see the following message at the end:
  24. #        "End of archive 2 (of 30)."
  25. # Contents:  patch7.06
  26. # Wrapped by billr@saab on Wed Feb 21 10:04:23 1990
  27. PATH=/bin:/usr/bin:/usr/ucb ; export PATH
  28. if test -f 'patch7.06' -a "${1}" != "-c" ; then 
  29.   echo shar: Renaming existing file \"'patch7.06'\" to \"'patch7.06.orig'\"
  30.   mv -f 'patch7.06' 'patch7.06.orig'
  31. fi
  32. echo shar: Extracting \"'patch7.06'\" \(57309 characters\)
  33. sed "s/^X//" >'patch7.06' <<'END_OF_FILE'
  34. X*** src/Old/potion.c    Mon Feb 19 18:51:51 1990
  35. X--- src/potion.c    Sun Feb 18 11:46:24 1990
  36. X***************
  37. X*** 4,14 ****
  38. X--- 4,27 ----
  39. X  
  40. X  #include "hack.h"
  41. X  
  42. X+ #ifdef OVLB
  43. X  static int nothing, unkn;
  44. X+ #endif /* OVLB */
  45. X+ 
  46. X  #ifdef WORM
  47. X+ 
  48. X+ extern boolean notonhead;
  49. X+ 
  50. X+ #ifdef OVLB
  51. X+ 
  52. X  boolean notonhead = FALSE;
  53. X+ 
  54. X+ #endif /* OVLB */
  55. X+ 
  56. X  #endif
  57. X  
  58. X+ #ifdef OVLB
  59. X+ 
  60. X  static const char beverages[] = { POTION_SYM, 0 };
  61. X  
  62. X  void
  63. X***************
  64. X*** 128,136 ****
  65. X          if (!Blind && talk) pline("Everything looks SO boring now.");
  66. X          for (mtmp=fmon; mtmp; mtmp=mtmp->nmon)
  67. X            if (showmon(mtmp))
  68. X!             atl(mtmp->mx, mtmp->my, (!mtmp->mappearance ||
  69. X                           Protection_from_shape_changers)
  70. X!             ? mtmp->data->mlet : mtmp->mappearance);
  71. X          flags.botl = 1;
  72. X      }
  73. X      if (xtime && !old ) {
  74. X--- 141,149 ----
  75. X          if (!Blind && talk) pline("Everything looks SO boring now.");
  76. X          for (mtmp=fmon; mtmp; mtmp=mtmp->nmon)
  77. X            if (showmon(mtmp))
  78. X!             atl(mtmp->mx, mtmp->my, (!mtmp->m_ap_type ||
  79. X                           Protection_from_shape_changers)
  80. X!             ? mtmp->data->mlet : (char) mimic_appearance(mtmp));
  81. X          flags.botl = 1;
  82. X      }
  83. X      if (xtime && !old ) {
  84. X***************
  85. X*** 159,164 ****
  86. X--- 172,181 ----
  87. X  dodrink() {
  88. X      register struct obj *otmp;
  89. X  
  90. X+     if (Strangled) {
  91. X+         pline("If you can't breathe air, how can you drink liquid?");
  92. X+         return 0;
  93. X+     }
  94. X  #ifdef FOUNTAINS
  95. X      /* Is there a fountain to drink from here? */
  96. X          if (IS_FOUNTAIN(levl[u.ux][u.uy].typ)) {
  97. X***************
  98. X*** 271,277 ****
  99. X                  u.ualigntyp == U_CHAOTIC) {
  100. X              if(otmp->blessed) {
  101. X              pline("This burns like acid!");
  102. X!             losehp(d(2,6), "potion of holy water");
  103. X              } else if(otmp->cursed) {
  104. X              You("feel quite proud of yourself.");
  105. X              healup(d(2,6),0,0,0);
  106. X--- 288,301 ----
  107. X                  u.ualigntyp == U_CHAOTIC) {
  108. X              if(otmp->blessed) {
  109. X              pline("This burns like acid!");
  110. X!             if (u.ulycn != -1) {
  111. X!                 Your("affinity to %s disappears!",
  112. X!                      makeplural(mons[u.ulycn].mname));
  113. X!                 if(uasmon == &mons[u.ulycn] && !Polymorph_control)
  114. X!                     rehumanize();
  115. X!                 u.ulycn = -1;
  116. X!             }
  117. X!             losehp(d(2,6), "potion of holy water", KILLED_BY_AN);
  118. X              } else if(otmp->cursed) {
  119. X              You("feel quite proud of yourself.");
  120. X              healup(d(2,6),0,0,0);
  121. X***************
  122. X*** 293,299 ****
  123. X              } else {
  124. X              if(u.ualigntyp == U_LAWFUL) {
  125. X                  pline("This burns like acid!");
  126. X!                 losehp(d(2,6), "potion of unholy water");
  127. X              } else
  128. X                  You("feel full of dread.");
  129. X              }
  130. X--- 317,324 ----
  131. X              } else {
  132. X              if(u.ualigntyp == U_LAWFUL) {
  133. X                  pline("This burns like acid!");
  134. X!                 losehp(d(2,6), "potion of unholy water",
  135. X!                 KILLED_BY_AN);
  136. X              } else
  137. X                  You("feel full of dread.");
  138. X              }
  139. X***************
  140. X*** 304,310 ****
  141. X                Hallucination ? "furniture polish" : "liquid fire");
  142. X          if (!otmp->blessed) make_confused(HConfusion + d(3,8),FALSE);
  143. X          /* the whiskey makes us feel better */
  144. X!         if(u.uhp < u.uhpmax) losehp(-1, "bottle of whiskey");
  145. X          lesshungry(10 * (2 + bcsign(otmp)));
  146. X          if(otmp->cursed) {
  147. X              You("pass out.");
  148. X--- 329,335 ----
  149. X                Hallucination ? "furniture polish" : "liquid fire");
  150. X          if (!otmp->blessed) make_confused(HConfusion + d(3,8),FALSE);
  151. X          /* the whiskey makes us feel better */
  152. X!         if(u.uhp < u.uhpmax) losehp(-1, "", 0); /* can't kill you */
  153. X          lesshungry(10 * (2 + bcsign(otmp)));
  154. X          if(otmp->cursed) {
  155. X              You("pass out.");
  156. X***************
  157. X*** 340,349 ****
  158. X--- 365,382 ----
  159. X                 You("feel rather airy."), unkn++;
  160. X          }
  161. X          if (otmp->blessed && !(HInvis & INTRINSIC)) {
  162. X+ #ifndef MACOS
  163. X              pline("Do you want the invisibility to be permanent? ");
  164. X              nothing = 0;
  165. X              if (yn()=='n') HInvis += rn1(15,31);
  166. X              else HInvis |= INTRINSIC;
  167. X+ #else
  168. X+             nothing = 0;
  169. X+             if (UseMacAlertText(128,
  170. X+                 "Do you want the invisibility to be permanent ?")
  171. X+                 == 2) HInvis += rn1(15,31);
  172. X+             else HInvis |= INTRINSIC;
  173. X+ #endif
  174. X          } else HInvis += rn1(15,31);
  175. X          if(otmp->cursed) {
  176. X              pline("For some reason, you feel your presence is known.");
  177. X***************
  178. X*** 411,417 ****
  179. X          pline("(But in fact it was mildly stale orange juice.)");
  180. X  #endif
  181. X              if (pl_character[0] != 'H')
  182. X!                 losehp(1, "mildly contaminated potion");
  183. X          } else {
  184. X              if(Poison_resistance)
  185. X  #ifdef TUTTI_FRUTTI
  186. X--- 444,451 ----
  187. X          pline("(But in fact it was mildly stale orange juice.)");
  188. X  #endif
  189. X              if (pl_character[0] != 'H')
  190. X!                 losehp(1, "mildly contaminated potion",
  191. X!                     KILLED_BY_AN);
  192. X          } else {
  193. X              if(Poison_resistance)
  194. X  #ifdef TUTTI_FRUTTI
  195. X***************
  196. X*** 427,433 ****
  197. X              adjattrib(typ,Poison_resistance ? -1 : -rn1(4,3), TRUE);
  198. X              if(!Poison_resistance)
  199. X                  losehp(rnd(10)+5*!!(otmp->cursed),
  200. X!                        "contaminated potion");
  201. X              }
  202. X          }
  203. X          if(Hallucination) {
  204. X--- 461,467 ----
  205. X              adjattrib(typ,Poison_resistance ? -1 : -rn1(4,3), TRUE);
  206. X              if(!Poison_resistance)
  207. X                  losehp(rnd(10)+5*!!(otmp->cursed),
  208. X!                        "contaminated potion", KILLED_BY_AN);
  209. X              }
  210. X          }
  211. X          if(Hallucination) {
  212. X***************
  213. X*** 526,532 ****
  214. X                      You("hit your %s on the ceiling.",
  215. X                          body_part(HEAD));
  216. X                      losehp(uarmh ? 1 : rnd(10),
  217. X!                         "collision with the ceiling");
  218. X                  } else (void) doup();
  219. X              }
  220. X          } else
  221. X--- 560,567 ----
  222. X                      You("hit your %s on the ceiling.",
  223. X                          body_part(HEAD));
  224. X                      losehp(uarmh ? 1 : rnd(10),
  225. X!                         "colliding with the ceiling",
  226. X!                         KILLED_BY);
  227. X                  } else (void) doup();
  228. X              }
  229. X          } else
  230. X***************
  231. X*** 591,597 ****
  232. X  void
  233. X  strange_feeling(obj,txt)
  234. X  register struct obj *obj;
  235. X! register char *txt;
  236. X  {
  237. X      if(flags.beginner)
  238. X          You("have a %s feeling for a moment, then it passes.",
  239. X--- 626,632 ----
  240. X  void
  241. X  strange_feeling(obj,txt)
  242. X  register struct obj *obj;
  243. X! register const char *txt;
  244. X  {
  245. X      if(flags.beginner)
  246. X          You("have a %s feeling for a moment, then it passes.",
  247. X***************
  248. X*** 617,623 ****
  249. X  register struct monst *mon;
  250. X  register struct obj *obj;
  251. X  {
  252. X!     register char *botlnam = bottlenames[rn2(SIZE(bottlenames))];
  253. X      boolean uclose, isyou = (mon == &youmonst);
  254. X  
  255. X      if(isyou) {
  256. X--- 652,658 ----
  257. X  register struct monst *mon;
  258. X  register struct obj *obj;
  259. X  {
  260. X!     register const char *botlnam = bottlenames[rn2(SIZE(bottlenames))];
  261. X      boolean uclose, isyou = (mon == &youmonst);
  262. X  
  263. X      if(isyou) {
  264. X***************
  265. X*** 624,630 ****
  266. X          uclose = TRUE;
  267. X          pline("The %s crashes on your %s and breaks into shivers.",
  268. X              botlnam, body_part(HEAD));
  269. X!         losehp(rnd(2), "thrown potion");
  270. X      } else {
  271. X          uclose = (dist(mon->mx,mon->my) < 3);
  272. X          if(Blind) pline("Crash!");
  273. X--- 659,665 ----
  274. X          uclose = TRUE;
  275. X          pline("The %s crashes on your %s and breaks into shivers.",
  276. X              botlnam, body_part(HEAD));
  277. X!         losehp(rnd(2), "thrown potion", KILLED_BY_AN);
  278. X      } else {
  279. X          uclose = (dist(mon->mx,mon->my) < 3);
  280. X          if(Blind) pline("Crash!");
  281. X***************
  282. X*** 675,684 ****
  283. X          pmon(mon);
  284. X          break;
  285. X      case POT_PARALYSIS:
  286. X!         mon->mfroz = 1;
  287. X          break;
  288. X      case POT_SPEED:
  289. X!         mon->mspeed = MFAST;
  290. X          break;
  291. X      case POT_BLINDNESS:
  292. X          {
  293. X--- 710,726 ----
  294. X          pmon(mon);
  295. X          break;
  296. X      case POT_PARALYSIS:
  297. X!         if (mon->mcanmove) {
  298. X!             mon->mcanmove = 0;
  299. X!             /* really should be rnd(5) for consistency with players
  300. X!              * breathing potions, but...
  301. X!              */
  302. X!             mon->mfrozen = rnd(25);
  303. X!         }
  304. X          break;
  305. X      case POT_SPEED:
  306. X!         if (mon->mspeed == MSLOW) mon->mspeed = 0;
  307. X!         else mon->mspeed = MFAST;
  308. X          break;
  309. X      case POT_BLINDNESS:
  310. X          {
  311. X***************
  312. X*** 685,690 ****
  313. X--- 727,733 ----
  314. X              register int btmp = 64 + rn2(32) +
  315. X                      rn2(32) * !resist(mon, POTION_SYM, 0, NOTELL);
  316. X              mon->mblinded |= btmp;
  317. X+             mon->mcansee = 0;
  318. X          }
  319. X          break;
  320. X      case POT_WATER:
  321. X***************
  322. X*** 857,863 ****
  323. X  dodip()
  324. X  {
  325. X      register struct obj *potion, *obj;
  326. X!     char *tmp;
  327. X      uchar here;
  328. X  
  329. X      if(!(obj = getobj("#", "dip")))
  330. X--- 900,906 ----
  331. X  dodip()
  332. X  {
  333. X      register struct obj *potion, *obj;
  334. X!     const char *tmp;
  335. X      uchar here;
  336. X  
  337. X      if(!(obj = getobj("#", "dip")))
  338. X***************
  339. X*** 919,925 ****
  340. X              if (obj->blessed) {
  341. X                  if (!Blind)
  342. X                      Your("%s %s.", aobjnam(obj, "glow"),
  343. X!                       Hallucination ? hcolor() : "brown");
  344. X                  obj->blessed=0;
  345. X                  obj->bknown=1;
  346. X                  goto poof;
  347. X--- 962,968 ----
  348. X              if (obj->blessed) {
  349. X                  if (!Blind)
  350. X                      Your("%s %s.", aobjnam(obj, "glow"),
  351. X!                      Hallucination ? hcolor() : (const char *)"brown");
  352. X                  obj->blessed=0;
  353. X                  obj->bknown=1;
  354. X                  goto poof;
  355. X***************
  356. X*** 1014,1020 ****
  357. X      if(obj->otyp == UNICORN_HORN && neutralizes(obj, potion)) {
  358. X          pline("The potion clears.");
  359. X          potion->otyp = POT_WATER;
  360. X!         potion->blessed = potion->cursed = 0;
  361. X          return(1);
  362. X      }
  363. X  
  364. X--- 1057,1064 ----
  365. X      if(obj->otyp == UNICORN_HORN && neutralizes(obj, potion)) {
  366. X          pline("The potion clears.");
  367. X          potion->otyp = POT_WATER;
  368. X!         potion->blessed = 0;
  369. X!         potion->cursed = 0;
  370. X          return(1);
  371. X      }
  372. X  
  373. X***************
  374. X*** 1087,1094 ****
  375. X              at(mtmp->mx, mtmp->my,
  376. X                 (uchar)(Hallucination ? rndmonsym() : mtmp->data->mlet),
  377. X                 AT_MON);
  378. X!             if (otmp && otmp->cursed && (mtmp->msleep || mtmp->mfroz)) {
  379. X!                 mtmp->msleep = mtmp->mfroz = 0;
  380. X                  woken = TRUE;
  381. X              }
  382. X          }
  383. X--- 1131,1139 ----
  384. X              at(mtmp->mx, mtmp->my,
  385. X                 (uchar)(Hallucination ? rndmonsym() : mtmp->data->mlet),
  386. X                 AT_MON);
  387. X!             if (otmp && otmp->cursed && (mtmp->msleep || !mtmp->mcanmove)) {
  388. X!                 mtmp->msleep = mtmp->mfrozen = 0;
  389. X!                 mtmp->mcanmove = 1;
  390. X                  woken = TRUE;
  391. X              }
  392. X          }
  393. X***************
  394. X*** 1102,1107 ****
  395. X--- 1147,1155 ----
  396. X      return(0);
  397. X  }
  398. X  
  399. X+ #endif /* OVLB */
  400. X+ #ifdef OVL0
  401. X+ 
  402. X  /* object_detect is also used in the crystal ball routine */
  403. X  /* returns 1 if nothing was detected        */
  404. X  /* returns 0 if something was detected        */
  405. X***************
  406. X*** 1111,1155 ****
  407. X  {
  408. X      register struct obj    *objs;
  409. X      register struct monst    *mtmp;
  410. X  
  411. X      if(!fobj) {
  412. X!         if (otmp)
  413. X!             strange_feeling(otmp, "You feel a pull downward.");
  414. X!         return(1);
  415. X!     } else {
  416. X!         int mfound=FALSE;
  417. X! 
  418. X!         for(objs = fobj; objs; objs = objs->nobj)
  419. X!             if(objs->ox != u.ux || objs->oy != u.uy)
  420. X!                 goto outobjmap;
  421. X!         You("sense the presence of objects nearby.");
  422. X!         return(0);
  423. X!     outobjmap:
  424. X!         cls();
  425. X!         for(objs = fobj; objs; objs = objs->nobj)
  426. X  at(objs->ox, objs->oy, (uchar)(Hallucination ? rndobjsym() : objs->olet), AT_OBJ);
  427. X!         /* monster possessions added by GAN 12/16/86 */
  428. X!         for(mtmp = fmon ; mtmp ; mtmp = mtmp->nmon)
  429. X!             if(mtmp->minvent)
  430. X!                 for(objs = mtmp->minvent;objs;objs = objs->nobj)
  431. X!                     at(mtmp->mx, mtmp->my, (uchar)objs->olet, AT_OBJ);
  432. X!         if (otmp && otmp->cursed) {
  433. X!             for(mtmp = fmon; mtmp; mtmp = mtmp->nmon) {
  434. X!                 if (mtmp->mimic) {
  435. X!                     mnexto(mtmp);
  436. X!                     mfound = TRUE;
  437. X!                 }
  438. X              }
  439. X          }
  440. X-         prme();
  441. X-         You("sense the presence of objects.");
  442. X-         if (mfound) pline("Objects sense the presence of you.");
  443. X-         more();
  444. X-         docrt();
  445. X      }
  446. X      return(0);
  447. X  }
  448. X  
  449. X  /* the detections are pulled out so they can    */
  450. X  /* also be used in the crystal ball routine    */
  451. X  /* returns 1 if nothing was detected        */
  452. X--- 1159,1214 ----
  453. X  {
  454. X      register struct obj    *objs;
  455. X      register struct monst    *mtmp;
  456. X+     boolean mfound=FALSE;
  457. X  
  458. X      if(!fobj) {
  459. X!         for(mtmp = fmon; mtmp; mtmp = mtmp->nmon) {
  460. X!             if (mtmp->minvent) {
  461. X!                 /* OK, it's used for 2 different things */
  462. X!                 mfound = TRUE;
  463. X!                 break;
  464. X!             }
  465. X!         }
  466. X!         if (!mfound) {
  467. X!             if (otmp)
  468. X!                 strange_feeling(otmp, "You feel a pull downward.");
  469. X!             return(1);
  470. X!         }
  471. X!     }
  472. X!     mfound = FALSE;
  473. X!     for(objs = fobj; objs; objs = objs->nobj)
  474. X!         if(objs->ox != u.ux || objs->oy != u.uy)
  475. X!             goto outobjmap;
  476. X!     You("sense the presence of objects nearby.");
  477. X!     return(0);
  478. X! outobjmap:
  479. X!     cls();
  480. X!     for(objs = fobj; objs; objs = objs->nobj)
  481. X  at(objs->ox, objs->oy, (uchar)(Hallucination ? rndobjsym() : objs->olet), AT_OBJ);
  482. X!     /* monster possessions added by GAN 12/16/86 */
  483. X!     for(mtmp = fmon ; mtmp ; mtmp = mtmp->nmon)
  484. X!         if(mtmp->minvent)
  485. X!             for(objs = mtmp->minvent;objs;objs = objs->nobj)
  486. X!                 at(mtmp->mx, mtmp->my, (uchar)objs->olet, AT_OBJ);
  487. X!     if (otmp && otmp->cursed) {
  488. X!         for(mtmp = fmon; mtmp; mtmp = mtmp->nmon) {
  489. X!             if (mtmp->mimic) {
  490. X!                 mnexto(mtmp);
  491. X!                 mfound = TRUE;
  492. X              }
  493. X          }
  494. X      }
  495. X+     prme();
  496. X+     You("sense the presence of objects.");
  497. X+     if (mfound) pline("Objects sense the presence of you.");
  498. X+     more();
  499. X+     docrt();
  500. X      return(0);
  501. X  }
  502. X  
  503. X+ #endif /* OVL0 */
  504. X+ #ifdef OVLB
  505. X+ 
  506. X  /* the detections are pulled out so they can    */
  507. X  /* also be used in the crystal ball routine    */
  508. X  /* returns 1 if nothing was detected        */
  509. X***************
  510. X*** 1220,1222 ****
  511. X--- 1279,1283 ----
  512. X      docrt();
  513. X      return(0);
  514. X  }
  515. X+ 
  516. X+ #endif /* OVLB */
  517. X*** src/Old/pray.c    Mon Feb 19 18:52:47 1990
  518. X--- src/pray.c    Wed Feb  7 18:37:36 1990
  519. X***************
  520. X*** 1,4 ****
  521. X! /*    SCCS Id: @(#)pray.c    3.0    89/01/10
  522. X  /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
  523. X  /* Copyright (c) Benson I. Margulies, Mike Stephenson, Steve Linhart, 1989. */
  524. X  /* NetHack may be freely redistributed.  See license for details. */
  525. X--- 1,4 ----
  526. X! /*    SCCS Id: @(#)pray.c    3.0    89/11/20
  527. X  /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
  528. X  /* Copyright (c) Benson I. Margulies, Mike Stephenson, Steve Linhart, 1989. */
  529. X  /* NetHack may be freely redistributed.  See license for details. */
  530. X***************
  531. X*** 6,18 ****
  532. X  #include "hack.h"
  533. X  
  534. X  #ifdef THEOLOGY
  535. X  
  536. X  #define ALIGNLIM     (5L + (moves/200L))
  537. X  
  538. X  struct ghods {
  539. X- 
  540. X      char    classlet;
  541. X!     char    *law, *balance, *chaos;
  542. X  }  gods[] = {
  543. X  
  544. X  'A', /* Central American */    "Quetzalcotl", "Camaxtli", "Huhetotl",
  545. X--- 6,23 ----
  546. X  #include "hack.h"
  547. X  
  548. X  #ifdef THEOLOGY
  549. X+ static int NDECL(in_trouble);
  550. X+ static void FDECL(fix_worst_trouble,(int));
  551. X+ static void NDECL(angrygods);
  552. X+ static void NDECL(pleased);
  553. X+ static void NDECL(gods_upset);
  554. X+ static void FDECL(consume_offering,(struct obj *));
  555. X  
  556. X  #define ALIGNLIM     (5L + (moves/200L))
  557. X  
  558. X  struct ghods {
  559. X      char    classlet;
  560. X!     const char *law, *balance, *chaos;
  561. X  }  gods[] = {
  562. X  
  563. X  'A', /* Central American */    "Quetzalcotl", "Camaxtli", "Huhetotl",
  564. X***************
  565. X*** 159,165 ****
  566. X  {
  567. X      int i;
  568. X      struct obj *otmp = (struct obj *)0;
  569. X!     char *what = NULL;
  570. X  
  571. X      u.ublesscnt += rnz(100);
  572. X      switch (trouble) {
  573. X--- 164,170 ----
  574. X  {
  575. X      int i;
  576. X      struct obj *otmp = (struct obj *)0;
  577. X!     const char *what = NULL;
  578. X  
  579. X      u.ublesscnt += rnz(100);
  580. X      switch (trouble) {
  581. X***************
  582. X*** 187,193 ****
  583. X              pline("%s glow surrounds you.",
  584. X                    An(Hallucination ? hcolor() : golden));
  585. X              } else You("feel much better.");
  586. X!             u.uhp = u.uhpmax += 5;
  587. X              flags.botl = 1;
  588. X              break;
  589. X          case TROUBLE_STUCK_IN_WALL:
  590. X--- 192,201 ----
  591. X              pline("%s glow surrounds you.",
  592. X                    An(Hallucination ? hcolor() : golden));
  593. X              } else You("feel much better.");
  594. X!             if (u.uhpmax < u.ulevel * 5 + 11)
  595. X!             u.uhp = u.uhpmax += rnd(5);
  596. X!             else
  597. X!             u.uhp = u.uhpmax;
  598. X              flags.botl = 1;
  599. X              break;
  600. X          case TROUBLE_STUCK_IN_WALL:
  601. X***************
  602. X*** 207,217 ****
  603. X              what = rightglow;
  604. X              }
  605. X              goto decurse;
  606. X-             break;
  607. X          case TROUBLE_CURSED_BLINDFOLD:
  608. X              otmp = ublindf;
  609. X              goto decurse;
  610. X-             break;
  611. X          case TROUBLE_PUNISHED:
  612. X              Your("chain disappears.");
  613. X              unpunish();
  614. X--- 215,223 ----
  615. X***************
  616. X*** 261,268 ****
  617. X              otmp->bknown = 1;
  618. X              if (!Blind)
  619. X                  Your("%s %s.",
  620. X!                    what ? what : aobjnam (otmp, "softly glow"),
  621. X!                    Hallucination ? hcolor() : amber);
  622. X              break;
  623. X          case TROUBLE_HALLUCINATION:
  624. X              pline ("Looks like you are back in Kansas.");
  625. X--- 267,274 ----
  626. X              otmp->bknown = 1;
  627. X              if (!Blind)
  628. X                  Your("%s %s.",
  629. X!                    what ? what : (const char *)aobjnam (otmp, "softly glow"),
  630. X!                 Hallucination ? hcolor() : amber);
  631. X              break;
  632. X          case TROUBLE_HALLUCINATION:
  633. X              pline ("Looks like you are back in Kansas.");
  634. X***************
  635. X*** 269,275 ****
  636. X              make_hallucinated(0L,FALSE);
  637. X              break;
  638. X          case TROUBLE_BLIND:
  639. X!             pline ("Your %s feel better.", makeplural(body_part(EYE)));
  640. X              make_blinded(0L,FALSE);
  641. X              break;
  642. X          case TROUBLE_POISONED:
  643. X--- 275,281 ----
  644. X              make_hallucinated(0L,FALSE);
  645. X              break;
  646. X          case TROUBLE_BLIND:
  647. X!             Your("%s feel better.", makeplural(body_part(EYE)));
  648. X              make_blinded(0L,FALSE);
  649. X              break;
  650. X          case TROUBLE_POISONED:
  651. X***************
  652. X*** 304,310 ****
  653. X  
  654. X      /* changed from tmp = u.ugangr + abs (u.uluck) -- rph */
  655. X      tmp =  3*u.ugangr +
  656. X!            (u.uluck > 0 || u.ualign > 3 ? -u.uluck/3 : -u.uluck);
  657. X      if (tmp < 0) tmp = 0; /* possible if bad alignment but good luck */
  658. X      tmp =  (tmp > 15 ? 15 : tmp);  /* lets be a little reasonable */
  659. X      switch (tmp ? rn2(tmp): 0) {
  660. X--- 310,316 ----
  661. X  
  662. X      /* changed from tmp = u.ugangr + abs (u.uluck) -- rph */
  663. X      tmp =  3*u.ugangr +
  664. X!            (Luck > 0 || u.ualign > 3 ? -Luck/3 : -Luck);
  665. X      if (tmp < 0) tmp = 0; /* possible if bad alignment but good luck */
  666. X      tmp =  (tmp > 15 ? 15 : tmp);  /* lets be a little reasonable */
  667. X      switch (tmp ? rn2(tmp): 0) {
  668. X***************
  669. X*** 323,339 ****
  670. X              break;
  671. X          case 2:
  672. X          case 3:
  673. X  # ifdef POLYSELF
  674. X!             pline("A voice booms out:  \"Thou %s, %s.\"",
  675. X                    ugod_is_angry() ? "hast strayed from the path" :
  676. X                              "art arrogant",
  677. X                    u.usym == S_HUMAN ? "mortal" : "creature");
  678. X  # else
  679. X!             pline("A voice booms out:  \"Thou %s, mortal.\"",
  680. X                    ugod_is_angry() ? "hast strayed from the path" :
  681. X                              "art arrogant");
  682. X  # endif
  683. X!             pline("\"Thou must relearn thy lessons!\"");
  684. X              adjattrib(A_WIS, -1, FALSE);
  685. X              if (u.ulevel > 1) {
  686. X                  losexp();
  687. X--- 329,346 ----
  688. X              break;
  689. X          case 2:
  690. X          case 3:
  691. X+             pline("A voice thunders:");
  692. X  # ifdef POLYSELF
  693. X!             pline("\"Thou %s, %s.\"",
  694. X                    ugod_is_angry() ? "hast strayed from the path" :
  695. X                              "art arrogant",
  696. X                    u.usym == S_HUMAN ? "mortal" : "creature");
  697. X  # else
  698. X!             pline("\"Thou %s, mortal.\"",
  699. X                    ugod_is_angry() ? "hast strayed from the path" :
  700. X                              "art arrogant");
  701. X  # endif
  702. X!             verbalize("Thou must relearn thy lessons!");
  703. X              adjattrib(A_WIS, -1, FALSE);
  704. X              if (u.ulevel > 1) {
  705. X                  losexp();
  706. X***************
  707. X*** 355,366 ****
  708. X              rndcurse();
  709. X              break;
  710. X          case 7:
  711. X!         case 8:    pline("A voice booms out:  \"Thou durst call upon me?\"");
  712. X  # ifdef POLYSELF
  713. X              pline("\"Then die, %s!\"",
  714. X                    u.usym == S_HUMAN ? "mortal" : "creature");
  715. X  # else
  716. X!             pline("\"Then die, mortal!\"");
  717. X  # endif
  718. X              (void) makemon(&mons[ndemon()], u.ux, u.uy);
  719. X              break;
  720. X--- 362,374 ----
  721. X              rndcurse();
  722. X              break;
  723. X          case 7:
  724. X!         case 8:    pline("A voice booms out:");
  725. X!             verbalize("Thou durst call upon me?");
  726. X  # ifdef POLYSELF
  727. X              pline("\"Then die, %s!\"",
  728. X                    u.usym == S_HUMAN ? "mortal" : "creature");
  729. X  # else
  730. X!             verbalize("Then die, mortal!");
  731. X  # endif
  732. X              (void) makemon(&mons[ndemon()], u.ux, u.uy);
  733. X              break;
  734. X***************
  735. X*** 389,399 ****
  736. X  ohno:
  737. X                  if (Disint_resistance) {
  738. X      You("bask in the disintegration beam for a minute...");
  739. X!     pline("A voice rings out:  \"I believe it not!\"");
  740. X                      break;
  741. X                  }
  742. X              }
  743. X              You("fry to a crisp.");
  744. X              killer = "holy wrath";
  745. X              done(DIED);
  746. X              break;
  747. X--- 397,409 ----
  748. X  ohno:
  749. X                  if (Disint_resistance) {
  750. X      You("bask in the disintegration beam for a minute...");
  751. X!                     pline("A voice rings out:");
  752. X!                     verbalize("I believe it not!");
  753. X                      break;
  754. X                  }
  755. X              }
  756. X              You("fry to a crisp.");
  757. X+             killer_format = KILLED_BY_AN;
  758. X              killer = "holy wrath";
  759. X              done(DIED);
  760. X              break;
  761. X***************
  762. X*** 438,448 ****
  763. X      if (!trouble) pat_on_head = 1;
  764. X      else {
  765. X  #ifdef ALTARS
  766. X!         int action = rn1(on_altar() ? 3 + on_shrine() : 2, u.uluck+1);
  767. X  
  768. X          if (!on_altar()) action = max(action,2);
  769. X  #else
  770. X!         int action = rn1(4,u.uluck+1);
  771. X  #endif
  772. X  
  773. X          switch(min(action,5)) {
  774. X--- 448,458 ----
  775. X      if (!trouble) pat_on_head = 1;
  776. X      else {
  777. X  #ifdef ALTARS
  778. X!         int action = rn1(on_altar() ? 3 + on_shrine() : 2, Luck+1);
  779. X  
  780. X          if (!on_altar()) action = max(action,2);
  781. X  #else
  782. X!         int action = rn1(4,Luck+1);
  783. X  #endif
  784. X  
  785. X          switch(min(action,5)) {
  786. X***************
  787. X*** 461,467 ****
  788. X      }
  789. X  
  790. X      if(pat_on_head)
  791. X!     switch(rn2((u.uluck + 6)>>1))  {
  792. X  
  793. X          case 0:    break;
  794. X          case 1:
  795. X--- 471,477 ----
  796. X      }
  797. X  
  798. X      if(pat_on_head)
  799. X!     switch(rn2((Luck + 6)>>1))  {
  800. X  
  801. X          case 0:    break;
  802. X          case 1:
  803. X***************
  804. X*** 486,495 ****
  805. X              break;
  806. X          case 3:
  807. X  #if defined(STRONGHOLD) && defined(MUSIC)
  808. X!             /* takes 2 hints to get the music to enter the Stronghold */
  809. X              if (flags.soundok) {
  810. X                  if(music_heard < 1) {
  811. X!                 pline("A voice booms out:  \"Hark, mortal!\"");
  812. X                  verbalize("To enter the castle, thou must play the right tune!");
  813. X                  music_heard++;
  814. X                  break;
  815. X--- 496,511 ----
  816. X              break;
  817. X          case 3:
  818. X  #if defined(STRONGHOLD) && defined(MUSIC)
  819. X!             /* takes 2 hints to get the music to enter the stronghold */
  820. X              if (flags.soundok) {
  821. X                  if(music_heard < 1) {
  822. X!                 pline("A voice rings out:");
  823. X! # ifdef POLYSELF
  824. X!                 pline("\"Hark, %s!\"",
  825. X!                     u.usym == S_HUMAN ? "mortal" : "creature");
  826. X! # else
  827. X!                 verbalize("Hark, mortal!");
  828. X! # endif
  829. X                  verbalize("To enter the castle, thou must play the right tune!");
  830. X                  music_heard++;
  831. X                  break;
  832. X***************
  833. X*** 532,539 ****
  834. X          }
  835. X          case 5:
  836. X          {
  837. X!             char *msg="\"and thus I grant thee the gift of %s!\"";
  838. X!             pline("A voice booms out:  \"Thou hast pleased me with thy progress,\"");
  839. X              if (!(HTelepat & INTRINSIC))  {
  840. X                  HTelepat |= INTRINSIC;
  841. X                  pline(msg, "Telepathy");
  842. X--- 548,556 ----
  843. X          }
  844. X          case 5:
  845. X          {
  846. X!             const char *msg="\"and thus I grant thee the gift of %s!\"";
  847. X!             pline("A voice booms out:");
  848. X!             verbalize("Thou hast pleased me with thy progress,");
  849. X              if (!(HTelepat & INTRINSIC))  {
  850. X                  HTelepat |= INTRINSIC;
  851. X                  pline(msg, "Telepathy");
  852. X***************
  853. X*** 550,559 ****
  854. X                  } else u.ublessed++;
  855. X                  pline(msg, "my protection");
  856. X              }
  857. X!             pline ("\"Use it wisely in my name!\"");
  858. X              break;
  859. X          }
  860. X          case 7:
  861. X  #ifdef ELBERETH
  862. X              if (u.ualign > 3 && !u.uhand_of_elbereth) {
  863. X                  u.uhand_of_elbereth = TRUE;
  864. X--- 567,577 ----
  865. X                  } else u.ublessed++;
  866. X                  pline(msg, "my protection");
  867. X              }
  868. X!             verbalize("Use it wisely in my name!");
  869. X              break;
  870. X          }
  871. X          case 7:
  872. X+         case 8:
  873. X  #ifdef ELBERETH
  874. X              if (u.ualign > 3 && !u.uhand_of_elbereth) {
  875. X                  u.uhand_of_elbereth = TRUE;
  876. X***************
  877. X*** 561,569 ****
  878. X                  HFire_resistance |= INTRINSIC;
  879. X                  HCold_resistance |= INTRINSIC;
  880. X                  HPoison_resistance |= INTRINSIC;
  881. X                  if (u.ualigntyp != U_CHAOTIC) {
  882. X!                     pline("A voice booms out:  \"I crown thee...\"");
  883. X!                 pline("\"The Hand of Elbereth!\"");
  884. X  #ifdef NAMED_ITEMS
  885. X                  if(uwep && (uwep->otyp == LONG_SWORD)) {
  886. X                      bless(uwep);
  887. X--- 579,587 ----
  888. X                  HFire_resistance |= INTRINSIC;
  889. X                  HCold_resistance |= INTRINSIC;
  890. X                  HPoison_resistance |= INTRINSIC;
  891. X+                 pline("A voice booms out:");
  892. X                  if (u.ualigntyp != U_CHAOTIC) {
  893. X!                 verbalize("I crown thee...      The Hand of Elbereth!");
  894. X  #ifdef NAMED_ITEMS
  895. X                  if(uwep && (uwep->otyp == LONG_SWORD)) {
  896. X                      bless(uwep);
  897. X***************
  898. X*** 575,581 ****
  899. X                  } else {
  900. X                  register struct obj *obj;
  901. X  #ifdef NAMED_ITEMS
  902. X!                 pline("A voice booms out:  \"Thou art chosen to steal souls for Arioch!\"");
  903. X                  /* This does the same damage as Excalibur.
  904. X                   * Disadvantages: doesn't do bonuses to undead;
  905. X                   * doesn't aid searching.
  906. X--- 593,600 ----
  907. X                  } else {
  908. X                  register struct obj *obj;
  909. X  #ifdef NAMED_ITEMS
  910. X!                 const char *Stormbringer = "Stormbringer";
  911. X! 
  912. X                  /* This does the same damage as Excalibur.
  913. X                   * Disadvantages: doesn't do bonuses to undead;
  914. X                   * doesn't aid searching.
  915. X***************
  916. X*** 585,612 ****
  917. X                   * +5 weapon and turn it into a Stormbringer.
  918. X                   * Advantage: they don't need to already have a
  919. X                   * sword of the right type to get it...
  920. X                   */
  921. X                  if (Blind)
  922. X                      pline("Something appears at your %s.",
  923. X                      makeplural(body_part(FOOT)));
  924. X                  else
  925. X                      pline("%s sword appears at your %s!",
  926. X!                     An(Hallucination ? hcolor() : black),
  927. X                      makeplural(body_part(FOOT)));
  928. X-                 obj = mksobj(BROADSWORD, FALSE);
  929. X-                 obj = oname(obj, "Stormbringer", 0);
  930. X                  obj->rustfree = 1;
  931. X                  obj->cursed = 0;
  932. X-                 obj->blessed = 1;
  933. X              /* Why bless it?  Why not.  After all, chaotic gods
  934. X               * will bless regular weapons.  And blessed really
  935. X               * means given sanctified to a deity, which is certainly
  936. X               * sensible even for Stormbringer and a chaotic deity...
  937. X               */
  938. X!                 obj->spe = 1;
  939. X                  dropy(obj);
  940. X  #else
  941. X!                 pline("Thou shalt become the servant of Arioch!");
  942. X  #endif
  943. X                  }
  944. X                  break;
  945. X--- 604,646 ----
  946. X                   * +5 weapon and turn it into a Stormbringer.
  947. X                   * Advantage: they don't need to already have a
  948. X                   * sword of the right type to get it...
  949. X+                  * However, if Stormbringer already exists in
  950. X+                  * the game, an ordinary good broadsword is
  951. X+                  * given and the messages are a bit different.
  952. X                   */
  953. X+                 obj = mksobj(BROADSWORD, FALSE);
  954. X+                 if (exist_artifact(obj, Stormbringer))
  955. X+                     verbalize("Thou art chosen to take lives for Arioch!");
  956. X+                 else
  957. X+                     verbalize("Thou art chosen to steal souls for Arioch!");
  958. X                  if (Blind)
  959. X                      pline("Something appears at your %s.",
  960. X                      makeplural(body_part(FOOT)));
  961. X                  else
  962. X                      pline("%s sword appears at your %s!",
  963. X!                     An(exist_artifact(obj, Stormbringer) ?
  964. X!                        (const char *)"wide" :
  965. X!                        Hallucination ? hcolor() : black),
  966. X                      makeplural(body_part(FOOT)));
  967. X                  obj->rustfree = 1;
  968. X                  obj->cursed = 0;
  969. X              /* Why bless it?  Why not.  After all, chaotic gods
  970. X               * will bless regular weapons.  And blessed really
  971. X               * means given sanctified to a deity, which is certainly
  972. X               * sensible even for Stormbringer and a chaotic deity...
  973. X               */
  974. X!                 obj->blessed = 1;
  975. X! 
  976. X!                 /* if not "Stormbringer", make it a bit better otherwise */
  977. X!                 if (exist_artifact(obj, Stormbringer))
  978. X!                     obj->spe = 3;
  979. X!                 else
  980. X!                     obj->spe = 1;
  981. X!                 /* existence of "Stormbringer" is checked in oname() */
  982. X!                 obj = oname(obj, Stormbringer, 0);
  983. X                  dropy(obj);
  984. X  #else
  985. X!                 verbalize("Thou shalt become the servant of Arioch!");
  986. X  #endif
  987. X                  }
  988. X                  break;
  989. X***************
  990. X*** 616,624 ****
  991. X          case 6:    pline ("An object appears at your %s!",
  992. X                  makeplural(body_part(FOOT)));
  993. X  #ifdef SPELLS
  994. X!             (void) mkobj_at(SPBOOK_SYM, u.ux, u.uy);
  995. X  #else
  996. X!             (void) mkobj_at(SCROLL_SYM, u.ux, u.uy);
  997. X  #endif
  998. X              break;
  999. X  
  1000. X--- 650,658 ----
  1001. X          case 6:    pline ("An object appears at your %s!",
  1002. X                  makeplural(body_part(FOOT)));
  1003. X  #ifdef SPELLS
  1004. X!             bless(mkobj_at(SPBOOK_SYM, u.ux, u.uy));
  1005. X  #else
  1006. X!             bless(mkobj_at(SCROLL_SYM, u.ux, u.uy));
  1007. X  #endif
  1008. X              break;
  1009. X  
  1010. X***************
  1011. X*** 645,657 ****
  1012. X  #else
  1013. X      if (u.ugangr++)    angrygods();
  1014. X      else {            /* exactly one warning */
  1015. X! #ifdef ALTARS
  1016. X!         pline("The voice of %s booms out:  \"Thou hast angered me.\"",
  1017. X                  on_altar() ? a_gname() : u_gname());
  1018. X! #else
  1019. X!         pline("A voice booms out:  \"Thou hast angered me.\"");
  1020. X! #endif
  1021. X!         pline("\"Disturb me again at thine own risk!\"");
  1022. X      }
  1023. X  #endif
  1024. X  }
  1025. X--- 679,692 ----
  1026. X  #else
  1027. X      if (u.ugangr++)    angrygods();
  1028. X      else {            /* exactly one warning */
  1029. X! # ifdef ALTARS
  1030. X!         pline("The voice of %s booms out:",
  1031. X                  on_altar() ? a_gname() : u_gname());
  1032. X! # else
  1033. X!         pline("A voice booms out:");
  1034. X! # endif
  1035. X!         verbalize("Thou hast angered me.");
  1036. X!         verbalize("Disturb me again at thine own peril!");
  1037. X      }
  1038. X  #endif
  1039. X  }
  1040. X***************
  1041. X*** 665,674 ****
  1042. X  register struct obj *otmp;
  1043. X  {
  1044. X      if (Hallucination)
  1045. X!     pline ("Your sacrifice sprouts wings and a propeller and roars away!");
  1046. X      else if (Blind && u.ualigntyp == U_LAWFUL)
  1047. X!         pline("Your sacrifice disappears!");
  1048. X!     else pline ("Your sacrifice is consumed in a %s!",
  1049. X              u.ualigntyp == U_LAWFUL ? "flash of light" : "burst of flame");
  1050. X      if (carried(otmp)) useup(otmp);
  1051. X      else useupf(otmp);
  1052. X--- 700,709 ----
  1053. X  register struct obj *otmp;
  1054. X  {
  1055. X      if (Hallucination)
  1056. X!         Your("sacrifice sprouts wings and a propeller and roars away!");
  1057. X      else if (Blind && u.ualigntyp == U_LAWFUL)
  1058. X!         Your("sacrifice disappears!");
  1059. X!     else Your("sacrifice is consumed in a %s!",
  1060. X              u.ualigntyp == U_LAWFUL ? "flash of light" : "burst of flame");
  1061. X      if (carried(otmp)) useup(otmp);
  1062. X      else useupf(otmp);
  1063. X***************
  1064. X*** 679,686 ****
  1065. X  {
  1066. X      register struct obj *otmp;
  1067. X      int value = 0;
  1068. X- 
  1069. X  #ifdef ALTARS
  1070. X      if (!on_altar()) {
  1071. X          You("are not standing on an altar.");
  1072. X          return 0;
  1073. X--- 714,724 ----
  1074. X  {
  1075. X      register struct obj *otmp;
  1076. X      int value = 0;
  1077. X  #ifdef ALTARS
  1078. X+     /* Note: normal altar aligns are 0, 1, 2; this is -1, 0, 1 so it */
  1079. X+     /* can be compared with u.ualigntyp */
  1080. X+     int altaralign = (levl[u.ux][u.uy].altarmask & ~A_SHRINE) - 1;
  1081. X+ 
  1082. X      if (!on_altar()) {
  1083. X          You("are not standing on an altar.");
  1084. X          return 0;
  1085. X***************
  1086. X*** 726,732 ****
  1087. X              if (u.ualigntyp != U_CHAOTIC)
  1088. X              pline("You'll regret this infamous offense!");
  1089. X  #ifdef ALTARS
  1090. X!         if (levl[u.ux][u.uy].altarmask & ~A_SHRINE) {
  1091. X              /* curse the lawful/neutral altar */
  1092. X              pline("The altar is stained with human blood.");
  1093. X              levl[u.ux][u.uy].altarmask = A_CHAOS;
  1094. X--- 764,770 ----
  1095. X              if (u.ualigntyp != U_CHAOTIC)
  1096. X              pline("You'll regret this infamous offense!");
  1097. X  #ifdef ALTARS
  1098. X!         if (altaralign != U_CHAOTIC) {
  1099. X              /* curse the lawful/neutral altar */
  1100. X              pline("The altar is stained with human blood.");
  1101. X              levl[u.ux][u.uy].altarmask = A_CHAOS;
  1102. X***************
  1103. X*** 735,741 ****
  1104. X              register struct monst *dmon;
  1105. X      /* Human sacrifice on a chaotic altar is equivalent to demon summoning */
  1106. X  #ifdef THEOLOGY
  1107. X!             if (levl[u.ux][u.uy].altarmask & A_SHRINE)
  1108. X                  pline("The blood covers the altar!");
  1109. X              else {
  1110. X  #endif
  1111. X--- 773,779 ----
  1112. X              register struct monst *dmon;
  1113. X      /* Human sacrifice on a chaotic altar is equivalent to demon summoning */
  1114. X  #ifdef THEOLOGY
  1115. X!             if (altaralign == U_CHAOTIC)
  1116. X                  pline("The blood covers the altar!");
  1117. X              else {
  1118. X  #endif
  1119. X***************
  1120. X*** 776,788 ****
  1121. X          if (mtmp == &mons[PM_BLACK_UNICORN]) unicalign = -1;
  1122. X          else if (mtmp == &mons[PM_GRAY_UNICORN]) unicalign = 0;
  1123. X          else if (mtmp == &mons[PM_WHITE_UNICORN]) unicalign = 1;
  1124. X!         if (unicalign == u.ualigntyp) {
  1125. X              pline("Such an action is an insult to %s!", (unicalign== -1)
  1126. X                  ? "chaos" : unicalign ? "law" : "neutrality");
  1127. X              adjattrib(A_WIS, -1, TRUE);
  1128. X              value = -5;
  1129. X!         } else if ((unicalign == -u.ualigntyp) ||
  1130. X!                         (!u.ualigntyp && unicalign)) {
  1131. X              if (u.ualign < ALIGNLIM)
  1132. X              You("feel stridently %s!", (u.ualigntyp== U_CHAOTIC) ?
  1133. X                  "chaotic" : u.ualigntyp ? "lawful" : "neutral");
  1134. X--- 814,831 ----
  1135. X          if (mtmp == &mons[PM_BLACK_UNICORN]) unicalign = -1;
  1136. X          else if (mtmp == &mons[PM_GRAY_UNICORN]) unicalign = 0;
  1137. X          else if (mtmp == &mons[PM_WHITE_UNICORN]) unicalign = 1;
  1138. X! #ifdef __GNULINT__
  1139. X!         else { impossible("Bad unicorn type??"); unicalign = 0; }
  1140. X! #endif
  1141. X!         /* If same as altar, always a very bad action. */
  1142. X!         if (unicalign == altaralign) {
  1143. X              pline("Such an action is an insult to %s!", (unicalign== -1)
  1144. X                  ? "chaos" : unicalign ? "law" : "neutrality");
  1145. X              adjattrib(A_WIS, -1, TRUE);
  1146. X              value = -5;
  1147. X!         } else if (u.ualigntyp == altaralign) {
  1148. X!         /* If different from altar, and altar is same as yours, */
  1149. X!         /* get maximum alignment */
  1150. X              if (u.ualign < ALIGNLIM)
  1151. X              You("feel stridently %s!", (u.ualigntyp== U_CHAOTIC) ?
  1152. X                  "chaotic" : u.ualigntyp ? "lawful" : "neutral");
  1153. X***************
  1154. X*** 789,795 ****
  1155. X              else You("feel you are thoroughly on the right path.");
  1156. X              u.ualign = ALIGNLIM;
  1157. X              value += 3;
  1158. X!         }
  1159. X          }
  1160. X      }
  1161. X  #ifdef ENDGAME
  1162. X--- 832,843 ----
  1163. X              else You("feel you are thoroughly on the right path.");
  1164. X              u.ualign = ALIGNLIM;
  1165. X              value += 3;
  1166. X!         } else if (unicalign == u.ualigntyp) {
  1167. X!         /* If sacrificing unicorn of your alignment to altar not of */
  1168. X!         /* your alignment, your god gets angry and it's a conversion */
  1169. X!             u.ualign = -1;
  1170. X!             value = 1;
  1171. X!         } else value += 3;
  1172. X          }
  1173. X      }
  1174. X  #ifdef ENDGAME
  1175. X***************
  1176. X*** 824,831 ****
  1177. X              if(carried(otmp)) useup(otmp);    /* well, it's gone now */
  1178. X              else useupf(otmp);
  1179. X              You("offer the Amulet to %s...", a_gname());
  1180. X!             if (u.ualigntyp !=
  1181. X!                 (levl[u.ux][u.uy].altarmask & ~A_SHRINE) - 1) {
  1182. X              /* And the opposing team picks him up and
  1183. X                     carries him off on their shoulders */
  1184. X                 pline("%s accepts your gift, and gains dominion over %s...",
  1185. X--- 872,878 ----
  1186. X              if(carried(otmp)) useup(otmp);    /* well, it's gone now */
  1187. X              else useupf(otmp);
  1188. X              You("offer the Amulet to %s...", a_gname());
  1189. X!             if (u.ualigntyp != altaralign) {
  1190. X              /* And the opposing team picks him up and
  1191. X                     carries him off on their shoulders */
  1192. X                 pline("%s accepts your gift, and gains dominion over %s...",
  1193. X***************
  1194. X*** 833,844 ****
  1195. X              pline("%s is enraged...", u_gname());
  1196. X              pline("Fortunately, %s permits you to live...", a_gname());
  1197. X              pline("A cloud of %s smoke surrounds you...",
  1198. X!                 Hallucination ? hcolor() : "orange");
  1199. X              done(ESCAPED);
  1200. X              } else {        /* super big win */
  1201. X          pline("An invisible choir sings, and you are bathed in radiance...");
  1202. X!         pline("\"Congratulations, mortal!  In return for thy service,");
  1203. X!             pline("I grant thee the gift of Immortality!\"");
  1204. X              You("ascend to the status of Demigod...");
  1205. X              done(ASCENDED);
  1206. X              }
  1207. X--- 880,892 ----
  1208. X              pline("%s is enraged...", u_gname());
  1209. X              pline("Fortunately, %s permits you to live...", a_gname());
  1210. X              pline("A cloud of %s smoke surrounds you...",
  1211. X!                 Hallucination ? hcolor() : (const char *)"orange");
  1212. X              done(ESCAPED);
  1213. X              } else {        /* super big win */
  1214. X          pline("An invisible choir sings, and you are bathed in radiance...");
  1215. X!             verbalize("Congratulations, mortal!");
  1216. X!             more();
  1217. X! verbalize("In return for thy service, I grant thee the gift of Immortality!");
  1218. X              You("ascend to the status of Demigod...");
  1219. X              done(ASCENDED);
  1220. X              }
  1221. X***************
  1222. X*** 872,878 ****
  1223. X          boolean consumed = FALSE;
  1224. X  #ifdef ALTARS
  1225. X          /* Sacrificing at an altar of a different alignment */
  1226. X!         if (u.ualigntyp != (levl[u.ux][u.uy].altarmask & ~A_SHRINE) - 1) {
  1227. X          /* Is this a conversion ? */
  1228. X          if(ugod_is_angry()) {
  1229. X              if(u.ualignbase[0] == u.ualignbase[1]) {
  1230. X--- 920,926 ----
  1231. X          boolean consumed = FALSE;
  1232. X  #ifdef ALTARS
  1233. X          /* Sacrificing at an altar of a different alignment */
  1234. X!         if (u.ualigntyp != altaralign) {
  1235. X          /* Is this a conversion ? */
  1236. X          if(ugod_is_angry()) {
  1237. X              if(u.ualignbase[0] == u.ualignbase[1]) {
  1238. X***************
  1239. X*** 883,893 ****
  1240. X              You("have a sudden sense of a new direction.");
  1241. X              /* The player wears a helm of opposite alignment? */
  1242. X              if (uarmh && uarmh->otyp == HELM_OF_OPPOSITE_ALIGNMENT)
  1243. X!                 u.ualignbase[0] =
  1244. X!                 (levl[u.ux][u.uy].altarmask & ~A_SHRINE) - 1;
  1245. X              else
  1246. X!                 u.ualigntyp = u.ualignbase[0] =
  1247. X!                 (levl[u.ux][u.uy].altarmask & ~A_SHRINE) - 1;
  1248. X              flags.botl = 1;
  1249. X              /* Beware, Conversion is costly */
  1250. X              change_luck(-3);
  1251. X--- 931,939 ----
  1252. X              You("have a sudden sense of a new direction.");
  1253. X              /* The player wears a helm of opposite alignment? */
  1254. X              if (uarmh && uarmh->otyp == HELM_OF_OPPOSITE_ALIGNMENT)
  1255. X!                 u.ualignbase[0] = altaralign;
  1256. X              else
  1257. X!                 u.ualigntyp = u.ualignbase[0] = altaralign;
  1258. X              flags.botl = 1;
  1259. X              /* Beware, Conversion is costly */
  1260. X              change_luck(-3);
  1261. X***************
  1262. X*** 894,902 ****
  1263. X              u.ublesscnt += 300;
  1264. X              adjalign((int)(u.ualignbase[1] * (ALIGNLIM / 2)));
  1265. X              } else {
  1266. X!             pline("%s rejects your sacrifice!",a_gname());
  1267. X!             pline("The voice of %s booms:  \"Suffer, infidel!\"",
  1268. X!                     u_gname());
  1269. X              adjalign(-5);
  1270. X              u.ugangr += 3;
  1271. X              adjattrib(A_WIS, -2, TRUE);
  1272. X--- 940,948 ----
  1273. X              u.ublesscnt += 300;
  1274. X              adjalign((int)(u.ualignbase[1] * (ALIGNLIM / 2)));
  1275. X              } else {
  1276. X!             pline("%s rejects your sacrifice!", a_gname());
  1277. X!             pline("The voice of %s booms:", u_gname());
  1278. X!             verbalize("Suffer, infidel!");
  1279. X              adjalign(-5);
  1280. X              u.ugangr += 3;
  1281. X              adjattrib(A_WIS, -2, TRUE);
  1282. X***************
  1283. X*** 921,927 ****
  1284. X                  pline("The newly consecrated altar glows %s.",
  1285. X                  Hallucination ? hcolor() :
  1286. X                  u.ualigntyp == U_LAWFUL ? white :
  1287. X!                 u.ualigntyp ? black : "gray");
  1288. X              } else {
  1289. X              pline("Unluckily, you feel the power of %s decrease.",
  1290. X                      u_gname());
  1291. X--- 967,973 ----
  1292. X                  pline("The newly consecrated altar glows %s.",
  1293. X                  Hallucination ? hcolor() :
  1294. X                  u.ualigntyp == U_LAWFUL ? white :
  1295. X!                 u.ualigntyp ? black : (const char *)"gray");
  1296. X              } else {
  1297. X              pline("Unluckily, you feel the power of %s decrease.",
  1298. X                      u_gname());
  1299. X***************
  1300. X*** 983,988 ****
  1301. X--- 1029,1036 ----
  1302. X          if(!rn2(10)) {
  1303. X              otmp = mk_aligned_artifact((unsigned)(levl[u.ux][u.uy].altarmask & ~A_SHRINE));
  1304. X              if(otmp) {
  1305. X+                 if (otmp->spe < 0) otmp->spe = 0;
  1306. X+                 if (otmp->cursed) otmp->cursed = 0;
  1307. X                  dropy(otmp);
  1308. X                  pline("An object appears at your %s!",
  1309. X                    makeplural(body_part(FOOT)));
  1310. X***************
  1311. X*** 993,999 ****
  1312. X          change_luck((value * LUCKMAX) / (MAXVALUE * 2));
  1313. X          if (u.uluck != saved_luck) {
  1314. X              if (Blind)
  1315. X!             You("think you stepped on something.");
  1316. X              else You(Hallucination ?
  1317. X          "see crabgrass at your %s.  A funny thing in a dungeon." :
  1318. X          "glimpse a four-leaf clover at your %s.",
  1319. X--- 1041,1048 ----
  1320. X          change_luck((value * LUCKMAX) / (MAXVALUE * 2));
  1321. X          if (u.uluck != saved_luck) {
  1322. X              if (Blind)
  1323. X!             You("think something brushed your %s.",
  1324. X!                 body_part(FOOT));
  1325. X              else You(Hallucination ?
  1326. X          "see crabgrass at your %s.  A funny thing in a dungeon." :
  1327. X          "glimpse a four-leaf clover at your %s.",
  1328. X***************
  1329. X*** 1027,1038 ****
  1330. X  #ifdef POLYSELF
  1331. X      if (is_undead(uasmon)) {
  1332. X          if (aligntyp == 1 || (aligntyp == 0 && !rn2(10))) {
  1333. X!             pline(aligntyp == 1 ?
  1334. X!                   "\"Vile creature, thou durst call upon me?\"" :
  1335. X!                   "\"Walk no more, perversion of nature!\"");
  1336. X              You("feel like you are falling apart.");
  1337. X              rehumanize();
  1338. X!             losehp(rnd(20), "residual undead turning effect");
  1339. X              return(1);
  1340. X          }
  1341. X      }
  1342. X--- 1076,1088 ----
  1343. X  #ifdef POLYSELF
  1344. X      if (is_undead(uasmon)) {
  1345. X          if (aligntyp == 1 || (aligntyp == 0 && !rn2(10))) {
  1346. X!             verbalize(aligntyp == 1 ?
  1347. X!                   "Vile creature, thou durst call upon me?" :
  1348. X!                   "Walk no more, perversion of nature!");
  1349. X              You("feel like you are falling apart.");
  1350. X              rehumanize();
  1351. X!             losehp(rnd(20), "residual undead turning effect",
  1352. X!                 KILLED_BY_AN);
  1353. X              return(1);
  1354. X          }
  1355. X      }
  1356. X***************
  1357. X*** 1070,1076 ****
  1358. X          u.ublesscnt += rnz(250);
  1359. X          change_luck(-3);
  1360. X          gods_upset();
  1361. X!     } else if ((int)u.uluck < 0 || u.ugangr || align < 0)
  1362. X          angrygods();            /* naughty */
  1363. X      else    if (align >= 0) pleased();    /* nice */
  1364. X      nomovemsg = "You finish your prayer.";
  1365. X--- 1120,1126 ----
  1366. X          u.ublesscnt += rnz(250);
  1367. X          change_luck(-3);
  1368. X          gods_upset();
  1369. X!     } else if ((int)Luck < 0 || u.ugangr || align < 0)
  1370. X          angrygods();            /* naughty */
  1371. X      else    if (align >= 0) pleased();    /* nice */
  1372. X      nomovemsg = "You finish your prayer.";
  1373. X***************
  1374. X*** 1118,1124 ****
  1375. X  #  endif
  1376. X          ) {
  1377. X  
  1378. X!         pline("For some reason, the gods seem not to listen to you.");
  1379. X          aggravate();
  1380. X          return(0);
  1381. X      }
  1382. X--- 1168,1174 ----
  1383. X  #  endif
  1384. X          ) {
  1385. X  
  1386. X!         pline("For some reason, the gods seem to ignore you.");
  1387. X          aggravate();
  1388. X          return(0);
  1389. X      }
  1390. X***************
  1391. X*** 1144,1150 ****
  1392. X  
  1393. X              if(Confusion) {
  1394. X              pline("Unfortunately, your voice falters.");
  1395. X!             mtmp->mflee = mtmp->mfroz = mtmp->msleep = 0;
  1396. X              } else if (! resist(mtmp, '\0', 0, TELL))
  1397. X              switch (mtmp->data->mlet) {
  1398. X                  /* this is intentional, lichs are tougher
  1399. X--- 1194,1201 ----
  1400. X  
  1401. X              if(Confusion) {
  1402. X              pline("Unfortunately, your voice falters.");
  1403. X!             mtmp->mflee = mtmp->mfrozen = mtmp->msleep = 0;
  1404. X!             mtmp->mcanmove = 1;
  1405. X              } else if (! resist(mtmp, '\0', 0, TELL))
  1406. X              switch (mtmp->data->mlet) {
  1407. X                  /* this is intentional, lichs are tougher
  1408. X***************
  1409. X*** 1177,1189 ****
  1410. X  }
  1411. X  
  1412. X  #ifdef ALTARS
  1413. X! char *
  1414. X  a_gname()
  1415. X  {
  1416. X      return(a_gname_at(u.ux, u.uy));
  1417. X  }
  1418. X  
  1419. X! char *
  1420. X  a_gname_at(x,y)     /* returns the name of an altar's deity */
  1421. X  xchar x, y;
  1422. X  {
  1423. X--- 1228,1240 ----
  1424. X  }
  1425. X  
  1426. X  #ifdef ALTARS
  1427. X! const char *
  1428. X  a_gname()
  1429. X  {
  1430. X      return(a_gname_at(u.ux, u.uy));
  1431. X  }
  1432. X  
  1433. X! const char *
  1434. X  a_gname_at(x,y)     /* returns the name of an altar's deity */
  1435. X  xchar x, y;
  1436. X  {
  1437. X***************
  1438. X*** 1223,1234 ****
  1439. X  altar_wrath(x, y)
  1440. X  register int x, y;
  1441. X  {
  1442. X!         if(!strcmp(a_gname_at(x,y), u_gname())) {
  1443. X!         pline("%s's voice booms:  \"How darest thou desecrate my altar!\"", 
  1444. X!                     a_gname_at(x,y));
  1445. X          adjattrib(A_WIS, -1, FALSE);
  1446. X      } else {
  1447. X!         pline("A voice whispers in your ear:  \"Thou shalt pay, infidel!\"");
  1448. X          change_luck(-1);
  1449. X      }
  1450. X  }
  1451. X--- 1274,1286 ----
  1452. X  altar_wrath(x, y)
  1453. X  register int x, y;
  1454. X  {
  1455. X!     if(!strcmp(a_gname_at(x,y), u_gname())) {
  1456. X!         pline("The voice of %s booms:", a_gname_at(x,y));
  1457. X!         verbalize("How darest thou desecrate my altar!");
  1458. X          adjattrib(A_WIS, -1, FALSE);
  1459. X      } else {
  1460. X!         pline("A voice whispers in your ear:");
  1461. X!         verbalize("Thou shalt pay, infidel!");
  1462. X          change_luck(-1);
  1463. X      }
  1464. X  }
  1465. X***************
  1466. X*** 1236,1242 ****
  1467. X  #endif /* ALTARS */
  1468. X  
  1469. X  #ifdef THEOLOGY
  1470. X! char *
  1471. X  u_gname() {  /* returns the name of the player's deity */
  1472. X      register struct ghods *aghod;
  1473. X  
  1474. X--- 1288,1294 ----
  1475. X  #endif /* ALTARS */
  1476. X  
  1477. X  #ifdef THEOLOGY
  1478. X! const char *
  1479. X  u_gname() {  /* returns the name of the player's deity */
  1480. X      register struct ghods *aghod;
  1481. X  
  1482. X*** src/Old/pri.c    Mon Feb 19 18:53:47 1990
  1483. X--- src/pri.c    Sun Feb 18 16:31:50 1990
  1484. X***************
  1485. X*** 2,9 ****
  1486. X  /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
  1487. X  /* NetHack may be freely redistributed.  See license for details. */
  1488. X  
  1489. X  /* block some unused #defines to avoid overloading some cpp's */
  1490. X- #define MONATTK_H
  1491. X  #include "hack.h"
  1492. X  #include <ctype.h>  /* for isalpha() */
  1493. X  #if defined(ALTARS) && defined(THEOLOGY)
  1494. X--- 2,9 ----
  1495. X  /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
  1496. X  /* NetHack may be freely redistributed.  See license for details. */
  1497. X  
  1498. X+ #define MONATTK_H    /* comment line for pre-compiled headers */
  1499. X  /* block some unused #defines to avoid overloading some cpp's */
  1500. X  #include "hack.h"
  1501. X  #include <ctype.h>  /* for isalpha() */
  1502. X  #if defined(ALTARS) && defined(THEOLOGY)
  1503. X***************
  1504. X*** 11,21 ****
  1505. X  #endif
  1506. X  #include "termcap.h"
  1507. X  
  1508. X! static void FDECL(hilite, (int,int,UCHAR_P, UCHAR_P));
  1509. X! static void FDECL(cornbot, (int));
  1510. X! static boolean FDECL(ismnst, (CHAR_P));
  1511. X  #ifdef TEXTCOLOR
  1512. X! static uchar FDECL(mimic_color, (UCHAR_P));
  1513. X  #endif
  1514. X  
  1515. X  #ifndef ASCIIGRAPH
  1516. X--- 11,20 ----
  1517. X  #endif
  1518. X  #include "termcap.h"
  1519. X  
  1520. X! OSTATIC void FDECL(hilite, (int,int,UCHAR_P, UCHAR_P));
  1521. X! OSTATIC void FDECL(cornbot, (int));
  1522. X  #ifdef TEXTCOLOR
  1523. X! OSTATIC uchar FDECL(mimic_color, (struct monst *));
  1524. X  #endif
  1525. X  
  1526. X  #ifndef ASCIIGRAPH
  1527. X***************
  1528. X*** 23,41 ****
  1529. X  #endif
  1530. X  
  1531. X  #ifndef g_putch
  1532. X  static boolean GFlag = FALSE; /* graphic flag */
  1533. X  #endif
  1534. X  
  1535. X  /* 100 suffices for bot(); must be larger than COLNO */
  1536. X  #define MAXCO 100
  1537. X! static char oldbot1[MAXCO], newbot1[MAXCO];
  1538. X! static char oldbot2[MAXCO], newbot2[MAXCO];
  1539. X  static const char *dispst = "*0#@#0#*0#@#0#*0#@#0#*0#@#0#*0#@#0#*";
  1540. X! static int mrank_sz = 0;  /* loaded by max_rank_sz (called in u_init) */
  1541. X  
  1542. X! #ifdef CLIPPING
  1543. X! #define curs(x, y) win_curs((x), (y)-2)
  1544. X! #endif
  1545. X  
  1546. X  void
  1547. X  swallowed(first)
  1548. X--- 22,61 ----
  1549. X  #endif
  1550. X  
  1551. X  #ifndef g_putch
  1552. X+ #ifdef OVL0
  1553. X  static boolean GFlag = FALSE; /* graphic flag */
  1554. X+ #endif /* OVL0 */
  1555. X  #endif
  1556. X  
  1557. X  /* 100 suffices for bot(); must be larger than COLNO */
  1558. X  #define MAXCO 100
  1559. X! VSTATIC char oldbot1[MAXCO], newbot1[MAXCO];
  1560. X! VSTATIC char oldbot2[MAXCO], newbot2[MAXCO];
  1561. X! #ifdef OVL2
  1562. X  static const char *dispst = "*0#@#0#*0#@#0#*0#@#0#*0#@#0#*0#@#0#*";
  1563. X! #endif /* OVL2 */
  1564. X! #ifndef OVLB
  1565. X! OSTATIC int mrank_sz;
  1566. X! #else /* OVLB */
  1567. X! XSTATIC int mrank_sz = 0;  /* loaded by max_rank_sz (called in u_init) */
  1568. X! #endif /* OVLB */
  1569. X! 
  1570. X! #ifdef CLIPPING
  1571. X! #define curs(x, y) (void) win_curs((x), (y)-2)
  1572. X! #endif
  1573. X! 
  1574. X! #ifdef OVL0
  1575. X! 
  1576. X! char *
  1577. X! eos(s)
  1578. X! register char *s;
  1579. X! {
  1580. X!     while(*s) s++;
  1581. X!     return(s);
  1582. X! }
  1583. X  
  1584. X! #endif /* OVL0 */
  1585. X! #ifdef OVLB
  1586. X  
  1587. X  void
  1588. X  swallowed(first)
  1589. X***************
  1590. X*** 135,145 ****
  1591. X              u.udispl = 0;
  1592. X              levl[u.udisx][u.udisy].scrsym = news0(u.udisx, u.udisy);
  1593. X          }
  1594. X!         doredraw();
  1595. X      }
  1596. X  }
  1597. X  #endif /* CLIPPING */
  1598. X  
  1599. X  /*
  1600. X   *  Allow for a different implementation than this...
  1601. X   */
  1602. X--- 155,168 ----
  1603. X              u.udispl = 0;
  1604. X              levl[u.udisx][u.udisy].scrsym = news0(u.udisx, u.udisy);
  1605. X          }
  1606. X!         (void) doredraw();
  1607. X      }
  1608. X  }
  1609. X  #endif /* CLIPPING */
  1610. X  
  1611. X+ #endif /* OVLB */
  1612. X+ #ifdef OVL0
  1613. X+ 
  1614. X  /*
  1615. X   *  Allow for a different implementation than this...
  1616. X   */
  1617. X***************
  1618. X*** 224,229 ****
  1619. X--- 247,255 ----
  1620. X  #endif
  1621. X  }
  1622. X  
  1623. X+ #endif /* OVL0 */
  1624. X+ #ifdef OVLB
  1625. X+ 
  1626. X  void
  1627. X  prme(){
  1628. X      if(!Invisible
  1629. X***************
  1630. X*** 236,246 ****
  1631. X      }
  1632. X  }
  1633. X  
  1634. X  void
  1635. X  shieldeff(x, y)        /* produce a magical shield effect at x,y */
  1636. X      register xchar x, y;
  1637. X  {
  1638. X!     register char *ch;
  1639. X      register struct monst *mtmp = 0;
  1640. X  
  1641. X      if((x != u.ux) || (y != u.uy)) {
  1642. X--- 262,275 ----
  1643. X      }
  1644. X  }
  1645. X  
  1646. X+ #endif /* OVLB */
  1647. X+ #ifdef OVL2
  1648. X+ 
  1649. X  void
  1650. X  shieldeff(x, y)        /* produce a magical shield effect at x,y */
  1651. X      register xchar x, y;
  1652. X  {
  1653. X!     register const char *ch;
  1654. X      register struct monst *mtmp = 0;
  1655. X  
  1656. X      if((x != u.ux) || (y != u.uy)) {
  1657. X***************
  1658. X*** 276,281 ****
  1659. X--- 305,313 ----
  1660. X      return;
  1661. X  }
  1662. X  
  1663. X+ #endif /* OVL2 */
  1664. X+ #ifdef OVLB
  1665. X+ 
  1666. X  int
  1667. X  doredraw()
  1668. X  {
  1669. X***************
  1670. X*** 283,288 ****
  1671. X--- 315,323 ----
  1672. X      return 0;
  1673. X  }
  1674. X  
  1675. X+ #endif /* OVLB */
  1676. X+ #ifdef OVL0
  1677. X+ 
  1678. X  void
  1679. X  docrt()
  1680. X  {
  1681. X***************
  1682. X*** 318,324 ****
  1683. X          mtmp->mdispl = 0;
  1684. X      seemons();    /* force new positions to be shown */
  1685. X  
  1686. X! #if ((defined(DGK) && !defined(TEXTCOLOR)) || defined(MACOS)) & !defined(CLIPPING)
  1687. X  # ifdef MACOS
  1688. X      t = (term_info *)GetWRefCon(HackWindow);
  1689. X      if (!t->inColor)
  1690. X--- 353,359 ----
  1691. X          mtmp->mdispl = 0;
  1692. X      seemons();    /* force new positions to be shown */
  1693. X  
  1694. X! #if ((defined(DGK) && !defined(TEXTCOLOR)) || defined(MACOS)) && !defined(CLIPPING)
  1695. X  # ifdef MACOS
  1696. X      t = (term_info *)GetWRefCon(HackWindow);
  1697. X      if (!t->inColor)
  1698. X***************
  1699. X*** 329,339 ****
  1700. X          for(y = 0; y < ROWNO; y++) {
  1701. X              char buf[COLNO+1];
  1702. X              int start, end;
  1703. X! # if defined(OLD_TOS) || defined(LSC) || defined(AZTEC)
  1704. X              setmem(buf, COLNO, ' ');
  1705. X  # else
  1706. X              memset(buf, ' ', COLNO);
  1707. X! # endif /* OLD_TOS */
  1708. X              for(x = 0, start = -1, end = -1; x < COLNO; x++)
  1709. X                  if((room = &levl[x][y])->new) {
  1710. X                      room->new = 0;
  1711. X--- 364,374 ----
  1712. X          for(y = 0; y < ROWNO; y++) {
  1713. X              char buf[COLNO+1];
  1714. X              int start, end;
  1715. X! # if defined(LSC) || defined(AZTEC) || defined(AZTEC_C)
  1716. X              setmem(buf, COLNO, ' ');
  1717. X  # else
  1718. X              memset(buf, ' ', COLNO);
  1719. X! # endif
  1720. X              for(x = 0, start = -1, end = -1; x < COLNO; x++)
  1721. X                  if((room = &levl[x][y])->new) {
  1722. X                      room->new = 0;
  1723. X***************
  1724. X*** 391,397 ****
  1725. X      bot();
  1726. X  }
  1727. X  
  1728. X! static void
  1729. X  cornbot(lth)
  1730. X  register int lth;
  1731. X  {
  1732. X--- 426,435 ----
  1733. X      bot();
  1734. X  }
  1735. X  
  1736. X! #endif /* OVL0 */
  1737. X! #ifdef OVLB
  1738. X! 
  1739. X! XSTATIC void
  1740. X  cornbot(lth)
  1741. X  register int lth;
  1742. X  {
  1743. X***************
  1744. X*** 400,405 ****
  1745. X--- 438,446 ----
  1746. X      flags.botl = 1;
  1747. X  }
  1748. X  
  1749. X+ #endif /* OVLB */
  1750. X+ #ifdef OVL0
  1751. X+ 
  1752. X  void
  1753. X  docorner(xmin, ymax)
  1754. X  register int xmin, ymax;
  1755. X***************
  1756. X*** 467,472 ****
  1757. X--- 508,516 ----
  1758. X      }
  1759. X  }
  1760. X  
  1761. X+ #endif /* OVL0 */
  1762. X+ #ifdef OVL1
  1763. X+ 
  1764. X  void
  1765. X  seeglds()
  1766. X  {
  1767. X***************
  1768. X*** 532,537 ****
  1769. X--- 576,584 ----
  1770. X      }
  1771. X  }
  1772. X  
  1773. X+ #endif /* OVL1 */
  1774. X+ #ifdef OVL0
  1775. X+ 
  1776. X  void
  1777. X  seemons()
  1778. X  {
  1779. X***************
  1780. X*** 564,577 ****
  1781. X          if (Hallucination)
  1782. X          atl(mon->mx,mon->my,
  1783. X          (char) ((!mon->mimic || Protection_from_shape_changers) ?
  1784. X!         rndmonsym() : (mon->mappearance == CLOSED_DOOR_SYM) ?
  1785. X!         CLOSED_DOOR_SYM : rndobjsym()));
  1786. X          else
  1787. X  
  1788. X          atl(mon->mx,mon->my,
  1789. X!             (!mon->mappearance ||
  1790. X               Protection_from_shape_changers) ?
  1791. X!              mon->data->mlet : mon->mappearance);
  1792. X          mon->mdispl = 1;
  1793. X          mon->mdx = mon->mx;
  1794. X          mon->mdy = mon->my;
  1795. X--- 611,624 ----
  1796. X          if (Hallucination)
  1797. X          atl(mon->mx,mon->my,
  1798. X          (char) ((!mon->mimic || Protection_from_shape_changers) ?
  1799. X!         rndmonsym() : (mon->m_ap_type == M_AP_FURNITURE) ?
  1800. X!         showsyms[mon->mappearance] : rndobjsym()));
  1801. X          else
  1802. X  
  1803. X          atl(mon->mx,mon->my,
  1804. X!             (!mon->m_ap_type ||
  1805. X               Protection_from_shape_changers) ?
  1806. X!              mon->data->mlet : (char) mimic_appearance(mon));
  1807. X          mon->mdispl = 1;
  1808. X          mon->mdx = mon->mx;
  1809. X          mon->mdy = mon->my;
  1810. X***************
  1811. X*** 584,589 ****
  1812. X--- 631,639 ----
  1813. X  #endif
  1814. X  }
  1815. X  
  1816. X+ #endif /* OVL0 */
  1817. X+ #ifdef OVL1
  1818. X+ 
  1819. X  void
  1820. X  unpmon(mon)
  1821. X  register struct monst *mon;
  1822. X***************
  1823. X*** 594,599 ****
  1824. X--- 644,652 ----
  1825. X      }
  1826. X  }
  1827. X  
  1828. X+ #endif /* OVL1 */
  1829. X+ #ifdef OVL0
  1830. X+ 
  1831. X  void
  1832. X  nscr() {
  1833. X      register int x, y;
  1834. X***************
  1835. X*** 618,623 ****
  1836. X--- 671,679 ----
  1837. X      scrly = ROWNO;
  1838. X  }
  1839. X  
  1840. X+ #endif /* OVL0 */
  1841. X+ #ifdef OVL1
  1842. X+ 
  1843. X  /* Make sure that there are 18 entries in the rank arrays. */
  1844. X  /* 0 and even entries are male ranks, odd entries are female. */
  1845. X  
  1846. X***************
  1847. X*** 873,879 ****
  1848. X      "Elentari",     /* Star-queen (Q.) */ /* Elbereth (S.) */
  1849. X  };
  1850. X  
  1851. X! static const char **
  1852. X  rank_array() {
  1853. X      register const char **ranks;
  1854. X  
  1855. X--- 929,941 ----
  1856. X      "Elentari",     /* Star-queen (Q.) */ /* Elbereth (S.) */
  1857. X  };
  1858. X  
  1859. X! #endif /* OVL1 */
  1860. X! 
  1861. X! OSTATIC const char **NDECL(rank_array);
  1862. X! 
  1863. X! #ifdef OVL1
  1864. X! 
  1865. X! XSTATIC const char **
  1866. X  rank_array() {
  1867. X      register const char **ranks;
  1868. X  
  1869. X***************
  1870. X*** 895,901 ****
  1871. X      return(ranks);
  1872. X  }
  1873. X  
  1874. X! static char *
  1875. X  rank() {
  1876. X      register int place;
  1877. X      register const char **ranks = rank_array();
  1878. X--- 957,969 ----
  1879. X      return(ranks);
  1880. X  }
  1881. X  
  1882. X! #endif /* OVL1 */
  1883. X! 
  1884. X! OSTATIC const char *rank();
  1885. X! 
  1886. X! #ifdef OVL1
  1887. X! 
  1888. X! XSTATIC const char *
  1889. X  rank() {
  1890. X      register int place;
  1891. X      register const char **ranks = rank_array();
  1892. X***************
  1893. X*** 915,920 ****
  1894. X--- 983,991 ----
  1895. X      return(pl_character);
  1896. X  }
  1897. X  
  1898. X+ #endif /* OVL1 */
  1899. X+ #ifdef OVLB
  1900. X+ 
  1901. X  void
  1902. X  max_rank_sz() {
  1903. X      register int i, maxr = 0;
  1904. X***************
  1905. X*** 928,933 ****
  1906. X--- 999,1007 ----
  1907. X      else mrank_sz = strlen(pl_character);
  1908. X  }
  1909. X  
  1910. X+ #endif /* OVLB */
  1911. X+ #ifdef OVL0
  1912. X+ 
  1913. X  static void
  1914. X  fillbot(row,oldbot,newbot)
  1915. X  int row;
  1916. X***************
  1917. X*** 1094,1100 ****
  1918. X      }
  1919. X      if(Confusion)       Sprintf(eos(newbot2), " Conf");
  1920. X      if(Sick)       Sprintf(eos(newbot2), " Sick");
  1921. X!     if(Blinded)       Sprintf(eos(newbot2), " Blind");
  1922. X      if(Stunned)       Sprintf(eos(newbot2), " Stun");
  1923. X      if(Hallucination)  Sprintf(eos(newbot2), " Hallu");
  1924. X  #ifdef CLIPPING
  1925. X--- 1168,1174 ----
  1926. X      }
  1927. X      if(Confusion)       Sprintf(eos(newbot2), " Conf");
  1928. X      if(Sick)       Sprintf(eos(newbot2), " Sick");
  1929. X!     if(Blind)       Sprintf(eos(newbot2), " Blind");
  1930. X      if(Stunned)       Sprintf(eos(newbot2), " Stun");
  1931. X      if(Hallucination)  Sprintf(eos(newbot2), " Hallu");
  1932. X  #ifdef CLIPPING
  1933. X***************
  1934. X*** 1113,1118 ****
  1935. X--- 1187,1194 ----
  1936. X      flags.botl = flags.botlx = 0;
  1937. X  }
  1938. X  
  1939. X+ #endif /* OVL0 */
  1940. X+ #ifdef OVLB
  1941. X  
  1942. X  void
  1943. X  mstatusline(mtmp)
  1944. X***************
  1945. X*** 1171,1176 ****
  1946. X--- 1247,1255 ----
  1947. X      flags.botlx = 1;
  1948. X  }
  1949. X  
  1950. X+ #endif /* OVLB */
  1951. X+ #ifdef OVL2
  1952. X+ 
  1953. X  char
  1954. X  rndmonsym()
  1955. X  {
  1956. X***************
  1957. X*** 1177,1183 ****
  1958. X      return(mons[rn2(NUMMONS - 1)].mlet);
  1959. X  }
  1960. X  
  1961. X! static const char objsyms[] = {
  1962. X      WEAPON_SYM, ARMOR_SYM, POTION_SYM, SCROLL_SYM, WAND_SYM,
  1963. X  #ifdef SPELLS
  1964. X      SPBOOK_SYM,
  1965. X--- 1256,1267 ----
  1966. X      return(mons[rn2(NUMMONS - 1)].mlet);
  1967. X  }
  1968. X  
  1969. X! /*
  1970. X!  * we don't use objsyms here because (someday) objsyms may be
  1971. X!  * user programmable
  1972. X!  */
  1973. X! 
  1974. X! static const char rndobs[] = {
  1975. X      WEAPON_SYM, ARMOR_SYM, POTION_SYM, SCROLL_SYM, WAND_SYM,
  1976. X  #ifdef SPELLS
  1977. X      SPBOOK_SYM,
  1978. X***************
  1979. X*** 1187,1193 ****
  1980. X  char
  1981. X  rndobjsym()
  1982. X  {
  1983. X!     return objsyms[rn2(SIZE(objsyms))];
  1984. X  }
  1985. X  
  1986. X  static const char *hcolors[] = {
  1987. X--- 1271,1277 ----
  1988. X  char
  1989. X  rndobjsym()
  1990. X  {
  1991. X!     return rndobs[rn2(SIZE(rndobs))];
  1992. X  }
  1993. X  
  1994. X  static const char *hcolors[] = {
  1995. X***************
  1996. X*** 1209,1220 ****
  1997. X      return hcolors[rn2(SIZE(hcolors))];
  1998. X  }
  1999. X  
  2000. X  /*ARGSUSED*/
  2001. X! static void
  2002. X  hilite(x, y, let, typ)
  2003. X  int x, y;
  2004. X  uchar let, typ;
  2005. X  {
  2006. X      if (let == ' '
  2007. X  #if !defined(MSDOS) && !defined(MACOS)
  2008. X          || !flags.standout
  2009. X--- 1293,1310 ----
  2010. X      return hcolors[rn2(SIZE(hcolors))];
  2011. X  }
  2012. X  
  2013. X+ #endif /* OVL2 */
  2014. X+ #ifdef OVL0
  2015. X+ 
  2016. X  /*ARGSUSED*/
  2017. X! XSTATIC void
  2018. X  hilite(x, y, let, typ)
  2019. X  int x, y;
  2020. X  uchar let, typ;
  2021. X  {
  2022. X+ #ifdef TEXTCOLOR
  2023. X+     boolean colorit;
  2024. X+ #endif
  2025. X      if (let == ' '
  2026. X  #if !defined(MSDOS) && !defined(MACOS)
  2027. X          || !flags.standout
  2028. X***************
  2029. X*** 1233,1244 ****
  2030. X               || let == S_MIMIC_DEF)
  2031. X              /* is an object */
  2032. X              typ = AT_OBJ;
  2033. X!         else if (ismnst((char) let))
  2034. X              /* is a monster */
  2035. X              typ = AT_MON;
  2036. X      }
  2037. X  #ifdef TEXTCOLOR
  2038. X!     if (flags.use_color) {
  2039. X          switch (typ) {
  2040. X          case AT_MON:
  2041. X              switch (let) {
  2042. X--- 1323,1341 ----
  2043. X               || let == S_MIMIC_DEF)
  2044. X              /* is an object */
  2045. X              typ = AT_OBJ;
  2046. X!         else if (vism_at(x, y))
  2047. X              /* is a monster */
  2048. X              typ = AT_MON;
  2049. X      }
  2050. X  #ifdef TEXTCOLOR
  2051. X! # ifdef REINCARNATION
  2052. X!     colorit = flags.use_color && dlevel != rogue_level;
  2053. X! # else
  2054. X!     colorit = flags.use_color;
  2055. X! # endif
  2056. X!     if (colorit) {
  2057. X!         struct monst *mtmp;
  2058. X! 
  2059. X          switch (typ) {
  2060. X          case AT_MON:
  2061. X              switch (let) {
  2062. X***************
  2063. X*** 1246,1255 ****
  2064. X                  typ = HI_OBJ;
  2065. X                  break;
  2066. X                  default:
  2067. X!                 if (u.ux == x && u.uy == y)
  2068. X                  typ = uasmon->mcolor;
  2069. X!                 else if (level.monsters[x][y])
  2070. X!                     typ = level.monsters[x][y]->data->mcolor;
  2071. X                  else
  2072. X                  typ = 0;
  2073. X              }
  2074. X--- 1343,1354 ----
  2075. X                  typ = HI_OBJ;
  2076. X                  break;
  2077. X                  default:
  2078. X!                 if (u.ux == x && u.uy == y && u.usym == let)
  2079. X                  typ = uasmon->mcolor;
  2080. X!                 else if (mtmp = m_at(x, y))
  2081. X!                     typ = mtmp->m_ap_type ?
  2082. X!                     mimic_color(mtmp) :
  2083. X!                     mtmp->data->mcolor;
  2084. X                  else
  2085. X                  typ = 0;
  2086. X              }
  2087. X***************
  2088. X*** 1266,1274 ****
  2089. X                  typ = mons[otmp->corpsenm].mcolor;
  2090. X              else
  2091. X                  typ = objects[level.objects[x][y]->otyp].oc_color;
  2092. X!             }
  2093. X!             else
  2094. X!             typ = mimic_color(let);
  2095. X              }
  2096. X              break;
  2097. X          case AT_MAP:
  2098. X--- 1365,1372 ----
  2099. X                  typ = mons[otmp->corpsenm].mcolor;
  2100. X              else
  2101. X                  typ = objects[level.objects[x][y]->otyp].oc_color;
  2102. X!              } else
  2103. X!             typ = mimic_color(m_at(x, y));
  2104. X              }
  2105. X              break;
  2106. X          case AT_MAP:
  2107. X***************
  2108. X*** 1295,1347 ****
  2109. X              break;
  2110. X          }
  2111. X      }
  2112. X!     if (typ && flags.use_color)
  2113. X!         xputs(hilites[typ]);
  2114. X      else
  2115. X  #endif
  2116. X      if (typ == AT_MON) revbeg();
  2117. X! 
  2118. X      g_putch(let);
  2119. X  
  2120. X  #ifdef TEXTCOLOR
  2121. X!     if (typ && flags.use_color) xputs(HE); else
  2122. X  #endif
  2123. X      if (typ == AT_MON) m_end();
  2124. X  }
  2125. X  
  2126. X! static boolean
  2127. X! ismnst(let)
  2128. X! char let;
  2129. X! {
  2130. X!     register int ct;
  2131. X!     register struct permonst *ptr;
  2132. X! 
  2133. X!     if (let & 0x80) return 0;
  2134. X!     if (isalpha(let)) return 1; /* for speed */
  2135. X  
  2136. X!     for (ct = 0 ; ct < NUMMONS; ct++) {
  2137. X!         ptr = &mons[ct];
  2138. X!         if(ptr->mlet == let) return 1;
  2139. X      }
  2140. X! #ifdef WORM
  2141. X!     if (let == S_WORM_TAIL) return 1;
  2142. X! #endif
  2143. X!     return 0;
  2144. X  }
  2145. X  
  2146. X  #ifdef TEXTCOLOR
  2147. X  /* pick an appropriate color for a mimic imitating an object */
  2148. X  
  2149. X! static uchar
  2150. X! mimic_color(let)
  2151. X! uchar let;
  2152. X  {
  2153. X!     int i;
  2154. X! 
  2155. X!     for(i = 0; i < NROFOBJECTS; i++) {
  2156. X!         if (objects[i].oc_olet == let)
  2157. X!             return objects[i].oc_color;
  2158. X      }
  2159. X-     return HI_OBJ;
  2160. X  }
  2161. X  #endif
  2162. X--- 1393,1476 ----
  2163. X              break;
  2164. X          }
  2165. X      }
  2166. X!     if (typ && colorit)
  2167. X!         xputs(hilites[Hallucination ? rn2(MAXCOLORS) : typ]);
  2168. X      else
  2169. X  #endif
  2170. X+ #ifdef REINCARNATION
  2171. X+     if (typ == AT_MON && dlevel != rogue_level) revbeg();
  2172. X+ #else
  2173. X      if (typ == AT_MON) revbeg();
  2174. X! #endif
  2175. X      g_putch(let);
  2176. X  
  2177. X  #ifdef TEXTCOLOR
  2178. X!     if (typ && colorit) xputs(HE); else
  2179. X  #endif
  2180. X+ #ifdef REINCARNATION
  2181. X+     if (typ == AT_MON && dlevel != rogue_level) m_end();
  2182. X+ #else
  2183. X      if (typ == AT_MON) m_end();
  2184. X+ #endif
  2185. X  }
  2186. X  
  2187. X! #endif /* OVL0 */
  2188. X! #ifdef OVL2
  2189. X! 
  2190. X! /*
  2191. X!  * find the appropriate symbol for printing a mimic
  2192. X!  */
  2193. X  
  2194. X! uchar
  2195. X! mimic_appearance(mon)
  2196. X! struct monst *mon;
  2197. X! {
  2198. X!     switch(mon->m_ap_type) {
  2199. X!     case M_AP_NOTHING:
  2200. X!         return mon->data->mlet;
  2201. X!     case M_AP_FURNITURE:
  2202. X!         return showsyms[mon->mappearance];
  2203. X!     case M_AP_OBJECT:
  2204. X!         return objects[mon->mappearance].oc_olet;
  2205. X!     case M_AP_MONSTER:
  2206. X!         return mons[mon->mappearance].mlet;
  2207. X!     case M_AP_GOLD:
  2208. X!         return GOLD_SYM;
  2209. X!     default:
  2210. X!         impossible("Monster mimicking %d", mon->m_ap_type);
  2211. X!         return 0;
  2212. X      }
  2213. X! /*NOTREACHED*/
  2214. X  }
  2215. X  
  2216. X  #ifdef TEXTCOLOR
  2217. X  /* pick an appropriate color for a mimic imitating an object */
  2218. X  
  2219. X! XSTATIC uchar
  2220. X! mimic_color(mtmp)
  2221. X! struct monst *mtmp;
  2222. X  {
  2223. X!     if (!mtmp)
  2224. X!         return 0;
  2225. X!     switch (mtmp->m_ap_type) {
  2226. X!     case M_AP_NOTHING:
  2227. X!         return mtmp->data->mcolor;
  2228. X!     case M_AP_FURNITURE:
  2229. X! # ifdef FOUNTAINS
  2230. X!         if (mtmp->mappearance == S_fountain && hilites[BLUE] != HI)
  2231. X!             return BLUE;
  2232. X! # endif
  2233. X!         return 0;
  2234. X!     case M_AP_OBJECT:
  2235. X!         return objects[mtmp->mappearance].oc_color;
  2236. X!     case M_AP_MONSTER:
  2237. X!         return mons[mtmp->mappearance].mcolor;
  2238. X!     case M_AP_GOLD:
  2239. X!         return HI_GOLD;
  2240. X!     default:
  2241. X!         return 0;
  2242. X      }
  2243. X  }
  2244. X  #endif
  2245. X+ 
  2246. X+ #endif /* OVL2 */
  2247. X
  2248. END_OF_FILE
  2249. if test 57309 -ne `wc -c <'patch7.06'`; then
  2250.     echo shar: \"'patch7.06'\" unpacked with wrong size!
  2251. fi
  2252. # end of 'patch7.06'
  2253. echo shar: End of archive 2 \(of 30\).
  2254. cp /dev/null ark2isdone
  2255. MISSING=""
  2256. for I in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 ; do
  2257.     if test ! -f ark${I}isdone ; then
  2258.     MISSING="${MISSING} ${I}"
  2259.     fi
  2260. done
  2261. if test "${MISSING}" = "" ; then
  2262.     echo You have unpacked all 30 archives.
  2263.     rm -f ark[1-9]isdone ark[1-9][0-9]isdone
  2264. else
  2265.     echo You still need to unpack the following archives:
  2266.     echo "        " ${MISSING}
  2267. fi
  2268. ##  End of shell archive.
  2269. exit 0
  2270.